package cyou.breathe.blog.auth.constant;

import java.util.Arrays;

/**
 * @author: breathe
 * @createTime: 2025-09-01
 */
public enum TokenSceneEnum {
    CREATE_ARTICLE("createArticle")
    ;
    private String scene;

    TokenSceneEnum(String scene) {
        this.scene = scene;
    }

    public String getScene() {
        return scene;
    }

    public void setScene(String scene) {
        this.scene = scene;
    }

    public static TokenSceneEnum getByScene(String scene) {
        return Arrays.stream(TokenSceneEnum.values()).filter(tokenSceneEnum -> tokenSceneEnum.getScene().equals(scene)).findFirst().orElse(null);
    }
}
